/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package cz.muni.fi.pb138;

import java.util.HashMap;
import cz.muni.fi.pb138.exceptions.*;

/**
 *
 * @author Marek
 */
public interface Manager {
    String getFormattedText(String word) throws ConnectionException, 
                                                XmlReadException,
                                                IllegalDictionaryNameException;
    /**
     * Changes plugin settings
     * @param user login name to DebDict to be changed
     * @param pass password, related to login name to DebDict, to be changed
     * @param dictionary type of dictionary to be set as default when searching
     */
    void changeSettings(String user, String pass, Dictionary dictionary) throws XmlWriteException;

    HashMap<String,String> getSettings() throws XmlReadException;
    /**
     * Temporary, just for compatibility, will be deleted
     * @return
     */
    HashMap<String,String> getDictionaries();
    
    /**
     * Get dictionary name by dictonary enum
     * @param dict
     * @return string specifying dictionary
     */
    String getDictionary(Dictionary dict);
    /**
     * Translates string to Dictionary
     * @param dict
     * @return Dictionary type from Enum
     */
    Dictionary translateString2Dictionary(String dict);
    Dictionary shortcutToDictionary(String dict);
}
